home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16300 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.2 KB  |  42 lines

  1. Newsgroups: comp.os.ms-windows.programmer.tools.mfc,comp.os.ms-windows.nt.pre-release,comp.lang.c++
  2. Path: artemis.sto.fdata.se!news
  3. From: wmguol@sto.fdata.se (Ola Gunnars)
  4. Subject: Re: Catastrophic OLE Error
  5. Sender: news@artemis.sto.fdata.se (UseNet NetNews)
  6. Message-ID: <DpMzp5.HJH@artemis.sto.fdata.se>
  7. Date: Wed, 10 Apr 1996 06:54:04 GMT
  8. References: <31689491.151762072@newsserv.ctp.com>
  9. Organization: WM-data F÷rsvarsdata AB, Sweden
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. sayer@ctp.com (Stephen D. Ayers) wrote:
  13.  
  14.  
  15. >I have built a very small OCX using the VC++ 4.1 project Wizard. The
  16. >control supports a single method with no arguments and no return
  17. >value.
  18.  
  19. >The VC++ OLE test container tool works fine. It allows me to invoke
  20. >methods without difficulty.
  21.  
  22. >However, whenever I try invoking methods on the object from VB, VBA
  23. >within Excel, or VC++ clients they all return "OLE Automation error -
  24. >Catastrophic failure" after a successful object create.
  25.  
  26. >This is running under NT 4.0 Beta 1.
  27.  
  28. >Am I missing something? Is this the proper way to create OCX objects? 
  29.  
  30. >Thanks,
  31.  
  32. How are you using the ocx ...
  33. You must use it in an form and get the object member ...
  34. dim obj as object
  35.  
  36. set obj = myocxinmyform.object
  37. obj.myfunc()
  38.  
  39. /Ola
  40.  
  41.  
  42.